# 构建阶段
FROM nginx:alpine as builder

# 复制所有静态文件
COPY index.html /usr/share/nginx/html/
COPY js/ /usr/share/nginx/html/js/
COPY styles/ /usr/share/nginx/html/styles/

# 最终阶段
FROM nginx:alpine

# 从构建阶段复制文件
COPY --from=builder /usr/share/nginx/html/ /usr/share/nginx/html/

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]